<div ng-include="sys_html('home/_header',true,true)"></div>
<style>
.list {position:relative;margin-bottom:20px}
.times {font-size:12px;color:#999}
.panel-heading {
	background:rgb(246, 248, 249);
    border-bottom: 0px solid transparent;
	text-align:center
}
.panel-body .item {margin:10px;padding-top:16px;border-bottom: 1px solid #f2f2f2;}
.left {float:left}
.bg-fff {background:#fff}
.margin0 {margin:0}
.fui-article-content {padding-top: 4px;}
.fui-article-content .fui-article-notread {height: 160px; background: #F4F4F4; margin: 10px; padding-top: 50px border: 2px dashed #999; display: none;}
.fui-article-content .fui-article-notread p {line-height: 30px; text-align: center; font-size: 16px; color: #666;}
.fui-article-content .fui-article-gps {font-size: 16px; text-align: center; line-height: 40px; color: #666; padding-top: 40px; padding-bottom: 100px;}
.fui-article-content img {vertical-align:bottom; max-width: 100%; border: 0;}
</style>
<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
		<div class="carousel-inner" role="listbox">
			<div class="item active">
				<a href="#">
					<img ng-src="{{tomedia(pagedata.account.banner380) || '../core/resource/images/banner-380.jpg'}}" style="display: block; width: 100%; height: auto;"/>
				</a>
			</div>
		</div>
	</div>
<div ng-if="pagedata.op=='list'" class="container-index" style="margin-top:20px;background:#fff">	
	<div class="row margin0">
	<ul class="nav nav-tabs" style="margin-bottom:20px">
		<li ng-class="{'active':pagedata.group_id==0}"><a href="javascript:;" ng-click="access_json('/article.list/','group_id=0')">全部分类</a></li>
		<li ng-repeat="item in pagedata.groups" ng-class="{'active':pagedata.group_id==item.id}"><a href="javascript:;" ng-click="access_json('/article.list/','group_id='+item.id)">{{item.title}}</a></li>
	</ul>
	<div class="news">
        <div class="left" style="width:850px;margin-left:0;text-align:left">
			<div class="panel panel-default">
				<div class="panel-heading" style="text-align:left">最新动态</div>
				<div class="panel-body">
					<a href="{{item.url}}" ng-repeat="item in pagedata.list" class="item">
						<h5><span style="font-size:17px">{{item.title}}</span> <span class="pull-right times">{{item.createtime}}</span></h5>
						<p class="subtitle">{{item.desc}}... ...</p>
					</a>
				</div>
				<div class="page" style="margin:auto;width:730px">
					<!-- 分页导航 -->
						<div ng-include="sys_html('common/page',true)"></div>
				</div>
			</div>
        </div>
		<div class="right" style="float:right;width:350px;border-left:0 solid #ddd;padding-right:0">
			<div class="panel panel-default">
				<div class="row margin0" style="">
					<a href="javascript:;" ng-class="{'panel-heading pc-sm-2':1,'bg-fff':pagedata.ishot==1}" ng-click="pagedata.ishot=1">
						按热度排行
					</a>
					<a href="javascript:;" ng-class="{'panel-heading pc-sm-2':1,'bg-fff':pagedata.ishot!=1}" ng-click="pagedata.ishot=0">
						按时间排行
					</a>
				</div>
				<div class="panel-body">
					<a href="{{item.url}}" ng-if="pagedata.ishot==1" class="item" ng-repeat="item in pagedata.hotlist" style="border-bottom: 1px dashed #f2f2f2;">
						<p style="font-size:16px">{{item.title}}</p>
						<p class="times">{{item.createtime}}</p>
					</a>
					<a href="{{item.url}}" ng-if="pagedata.ishot!=1 && $index<6" class="item" ng-repeat="item in pagedata.list" style="border-bottom: 1px dashed #f2f2f2;">
						<p style="font-size:16px">{{item.title}}</p>
						<p class="times">{{item.createtime}}</p>
					</a>
				</div>
			</div>
		</div>
    </div>
	</div>
</div>
<div ng-if="pagedata.op=='detail'" class="container-index" style="margin-top:20px;background:#fff">
	<div class="row margin0">
	<ul class="nav nav-tabs" style="margin-bottom:20px">
		<li ng-class="{'active':pagedata.group_id==0}"><a href="javascript:;" ng-click="access_json('/article.list/','group_id=0')">全部分类</a></li>
		<li ng-repeat="item in pagedata.fenlei" ng-class="{'active':pagedata.group_id==item.id}"><a href="javascript:;" ng-click="access_json('/article.list/','group_id='+item.id)">{{item.title}}</a></li>
	</ul>
	<div class="news">
        <div class="left" style="width:850px;margin-left:0">
			<div class="panel panel-default">
				<div class="panel-heading" style="text-align:left">首页 / 最新动态</div>
				<div class="panel-body">
					<h5 class="bold" style="margin-top:15px;font-size:18px">{{pagedata.item.title}}</h5>
					<p class="times">{{pagedata.item.createtime}} 阅读数:{{pagedata.item.readnum}}</p>
					<style>
					.noread{
						height:300px;
						overflow-y:hidden
					}
					.noread-btn {position: relative;padding-top:40px;margin-top:-36px}
					.noread-btn .exp-mask {
						position: absolute;
						top: 0;
						left: 0;
						width: 100%;
						height: 60px;
						background-image: linear-gradient(-180deg,rgba(255,255,255,0) 13%,#fff 63%);
					}
					</style>
					<div ng-class="{'fui-article-content':1,'noread':pagedata.item.noread}" ng-bind-html="trust(pagedata.item.content)"></div>
					<div class="noread-btn" ng-if="pagedata.item.noread && pagedata.item.fee>0">
						<div class="exp-mask"></div>
						<div class="weui_cells" style="margin-top:0;">
							<a ng-if="!pagedata.order_id" href="javascript:;" ng-click="pagedata.pay_submit({'article_id':pagedata.item.id},'core/article.list/pay/','core/article.list/detail/id='+pagedata.item.id)" class="weui_btn weui_btn_plain_primary">付费阅读(￥{{pagedata.item.fee}})</a>
							<a ng-if="pagedata.order_id" href="javascript:;" ng-click="pagedata.pay(pagedata.order_id)" class="weui_btn weui_btn_plain_primary">付费阅读(￥{{pagedata.item.fee}})</a>
						</div>
					</div>
					<div ng-if="(pagedata.item.article_rule_credit>0 || pagedata.item.article_rule_money>0) && pagedata.item.article_rule_daynum>0 " class="tips tips-yellow">
						<i class="fa fa-bullhorn"></i> [<red>分享奖励</red>]：
						<span ng-if="pagedata.item.article_rule_credit>0"><red>{{pagedata.item.article_rule_credit}}</red>积分/次</span>
						<span ng-if="pagedata.item.article_rule_money>0">￥<red>{{pagedata.item.article_rule_money}}</red>余额/次</span>
						<span ng-if="pagedata.item.article_rule_daynum>0">每天最多奖励<red>{{pagedata.item.article_rule_daynum}}</red>次</span>
						<span ng-if="pagedata.item.article_rule_allnum>0">每人最多奖励<red>{{pagedata.item.article_rule_allnum}}</red>次</span>
					</div>
				</div>
			</div>
        </div>
		<div class="right" style="float:right;width:350px;border-left:0 solid #ddd;padding-right:0">
			<div class="panel panel-default">
				<div class="row margin0" style="">
					<a href="javascript:;" ng-click="pagedata.ishot=1" ng-class="{'panel-heading pc-sm-2':1,'bg-fff':pagedata.ishot==1}">
						按热度排行
					</a>
					<a href="javascript:;" ng-click="pagedata.ishot=0" ng-class="{'panel-heading pc-sm-2':1,'bg-fff':pagedata.ishot!=1}">
						按时间排行
					</a>
				</div>
				<div class="panel-body">
					<a href="{{item.url}}" ng-if="pagedata.ishot==1" class="item" ng-repeat="item in pagedata.hotlist" style="border-bottom: 1px dashed #f2f2f2;">
						<p style="font-size:16px">{{item.title}}</p>
						<p class="times">{{item.createtime}}</p>
					</a>
					<a href="{{item.url}}" ng-if="pagedata.ishot!=1 && $index<6" class="item" ng-repeat="item in pagedata.list" style="border-bottom: 1px dashed #f2f2f2;">
						<p style="font-size:16px">{{item.title}}</p>
						<p class="times">{{item.createtime}}</p>
					</a>
				</div>
			</div>
		</div>
    </div>
	</div>
</div>
<div ng-include="sys_html('home/_footer',true)"></div>
<script>
scope.pagedata.ishot=1;
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	scope.post_json(post_url,post,function(result){
		if(result.order_id){
			scope.pagedata.order_id=result.order_id;
			scope.$evalAsync();
			scope.tool.pay(result.pay_id,function(res){
					if(res.type=='success'){
						scope.message('支付成功！','success',complete_url);
					}else{
						scope.message('支付失败！','success',complete_url);
					}
			});
		}
	});
}
scope.pagedata.pay=function(id){
	scope.post_json('core/article.list/twopay/',{'id':id},function(pay_id){
		scope.$evalAsync();
		scope.tool.pay(pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','core/article.list/detail/id='+id);
				}else{
					scope.message('支付失败！','success','core/article.list/detail/id='+id);
				}
		});
	});
}
</script>